import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/rest/model/page-model',
    method: 'get',
    params: query
  })
}

export function fetchPage() {
  return request({
    url: '',
    method: 'get'
  })
}

export function deploy(query) {
  return request({
    url: '/rest/model/deploy',
    method: 'post',
    params: query
  })
}

export function loadPngByModelId(modelId) {
  return request({
    url: '/rest/model/loadPngByModelId/' + modelId,
    method: 'get'
  })
}

export function loadXmlByModelId(modelId) {
  return request({
    url: '/rest/model/loadXmlByModelId/' + modelId,
    method: 'get'
  })
}
